<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTalentTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('talent', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name', 100)->comment('姓名');
            $table->string('recommend', 100)->default('')->comment('推荐职位');
            $table->string('first_recommend', 100)->default('')->comment('初次推荐');
            $table->tinyInteger('sex')->comment('性别');
            $table->string('birthday', 50)->default('')->comment('出生日期');
            $table->string('education', 50)->default('')->comment('学历');
            $table->string('university', 100)->default('')->comment('学校');
            $table->string('profession', 100)->default('')->comment('专业');
            $table->tinyInteger('interview_status')->default(0)->comment('面试状态');
            $table->tinyInteger('offer_status')->default(0)->comment('录用状态');
            $table->string('resume')->nullable()->comment('完整简历');
            $table->string('batch', 100)->default('')->comment('面试批次');

            $table->integer('wait_project_id')->default(0)->comment('待面试-项目名称');
            $table->tinyInteger('wait_status')->default(0)->comment('待面试-状态');
            $table->string('wait_batch', 100)->default('')->comment('待面试-面试批次');

            $table->string('first_recommend_job', 100)->default('')->comment('一面-推荐岗位');
            $table->tinyInteger('first_status')->default(0)->comment('一面-状态');

            $table->string('second_batch', 100)->default('')->comment('二面-面试批次');
            $table->string('second_recommend_job', 100)->default('')->comment('二面-推荐岗位');
            $table->tinyInteger('second_gzdl')->default(0)->comment('二面-工作动力');
            $table->tinyInteger('second_zyjn')->default(0)->comment('二面-专业技能');
            $table->tinyInteger('second_xmjy')->default(0)->comment('二面-项目经验');
            $table->tinyInteger('second_xxcx')->default(0)->comment('二面-学习创新');
            $table->tinyInteger('second_zxls')->default(0)->comment('二面-执行落实');
            $table->tinyInteger('second_total')->default(0)->comment('二面-总分');
            $table->string('second_comment')->default('')->comment('二面-其他评语');
            $table->string('second_conclusion')->default('')->comment('二面-面试结论');

            $table->tinyInteger('deleted')->default(0);

            $table->integer('created_at')->nullable();
            $table->integer('updated_at')->nullable();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('talent');
    }
}
